Serving a Dynamic HTML using Github Pages¶

In [2]:
import plotly.express as px
import plotly
from PIL import Image
import matplotlib.pyplot as plt
%matplotlib inline
In [3]:
data = plotly.data.stocks()
In [4]:
data.head()
Out[4]:
date GOOG AAPL AMZN FB NFLX MSFT
0 2018-01-01 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000
1 2018-01-08 1.018172 1.011943 1.061881 0.959968 1.053526 1.015988
2 2018-01-15 1.032008 1.019771 1.053240 0.970243 1.049860 1.020524
3 2018-01-22 1.066783 0.980057 1.140676 1.016858 1.307681 1.066561
4 2018-01-29 1.008773 0.917143 1.163374 1.018357 1.273537 1.040708

Plotly Chart¶

Trend of Microsoft Stock Price.¶
In [5]:
fig = px.line(data, x='date', y='MSFT')
fig.show()

Matplotlib Chart¶

Comparison between Apple and Amazon Stock price over time.¶

In [5]:
plt.plot(data["date"],data["AAPL"])
plt.plot(data["date"],data["AMZN"])
plt.legend(["AAPL","AMZN"])
Out[5]:
<matplotlib.legend.Legend at 0x22d2841de50>

Table¶

Company Stock Name
Google GOOG
Apple AAPL
Amazon AMZN
Facebook FB
Netflix NFLX
Microsoft MSFT

Equations of Regression¶

The equation of linear regression is given by:

$$ y = \beta_0 + \beta_1x_1 + \beta_2x_2 + \ldots + \beta_nx_n $$

The equation of logistic regression is given by:

$$ p(y=1|x) = \frac{1}{{1 + e^{-(\beta_0 + \beta_1x_1 + \beta_2x_2 + \ldots + \beta_nx_n)}}} $$
In [4]:
img = Image.open('../images/image.jpg')
fig = plt.imshow(img)
plt.axis('off')
fig.axes.get_xaxis().set_visible(False)
fig.axes.get_yaxis().set_visible(False)
In [ ]: